-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve logging message for no shards found to indicate that export m… #3681
Conversation
…ay still be ongoing Signed-off-by: Taylor Gray <[email protected]>
a03fc30
to
5da233d
Compare
Signed-off-by: Taylor Gray <[email protected]>
d2122d4
to
6b7b209
Compare
@@ -95,7 +95,7 @@ public void start(Buffer<Record<Event>> buffer) { | |||
Runnable fileLoaderScheduler = new DataFileScheduler(coordinator, loaderFactory, pluginMetrics, acknowledgementSetManager, dynamoDBSourceConfig); | |||
|
|||
ShardConsumerFactory consumerFactory = new ShardConsumerFactory(coordinator, dynamoDbStreamsClient, pluginMetrics, buffer); | |||
Runnable streamScheduler = new StreamScheduler(coordinator, consumerFactory, pluginMetrics, acknowledgementSetManager, dynamoDBSourceConfig, new BackoffCalculator()); | |||
Runnable streamScheduler = new StreamScheduler(coordinator, consumerFactory, pluginMetrics, acknowledgementSetManager, dynamoDBSourceConfig, new BackoffCalculator(dynamoDBSourceConfig.getTableConfigs().get(0).getExportConfig() != null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NPE is handled for dynamoDBSourceConfig.getTableConfigs().get(0)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We validate it is exactly one here so should be fine yes? (
Line 63 in 22647dc
@AssertTrue(message = "Exactly one table must be configured for the DynamoDb source.") |
…ay still be ongoing
Description
Reduces the logging for no shards acquired to every 50 retries (approximately every 12 minutes) and only if there are no shards being processed at the time on the node, with an error message that indicates this may be due to either all shards being consumed already (by other nodes), or that an export is still in progress if export is configured.
This log makes it so that when no shards are available or the export is ongoing, we will not just see this as the final log
Which makes the node appear stuck and like it is not doing anything
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.